home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6284 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: comma.rhein.de!yaps!arno
  2. From: arno@yaps.rhein.de (Arno Eigenwillig)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Sorting a list
  5. Message-ID: <dFiiy*6ig@yaps.rhein.de>
  6. Date: Sun, 24 Mar 1996 15:25:01 +0100
  7. References: <272.6650T63T1340@sn.no> <314F9F68.48E2@sapiens.com> <19960321.7D0ECE0.76B4@mojaveg.ridgecrest.ca.us>
  8. Organization: Yet Another Private Site in Meckenheim, Germany
  9. X-Copyright: This article may not be distributed on a CD-ROM
  10.  or in printed form without prior written consent of the author.
  11. X-Newsreader: Arn V 1.04
  12.  
  13. In article <19960321.7D0ECE0.76B4@mojaveg.ridgecrest.ca.us>,
  14.      Everett M. Greene writes:
  15.  
  16. > Any and all sorting algorithms are faster
  17. > than bubble sort.
  18.  
  19. No. From The Jargon File V3.3.1, entry "bogo-sort":
  20.  
  21.    Bogo-sort is equivalent to repeatedly throwing a deck of cards in
  22.    the air, picking them up at random, and then testing whether they
  23.    are in order.
  24.  
  25. In the average case, Bogo-sort is slower.
  26.  
  27. However, the question is, wheter this is an algorithm: If the sequence
  28. of the cards (or in generic terms, the sequence of the randomly permu-
  29. tated elements) is generated truly random each time, bogo-sort is not
  30. guaranteed to terminate in finite time (which is a requirement for an
  31. algorithm).
  32.  
  33. PS: :o)
  34.  
  35. -- __
  36. __/// Arno Eigenwillig /\ <arno@yaps.rhein.de> \/ PGP key available.
  37. \XX/   V+49-2225-5870  /\ <Arnooo @ #amigager> \/ MIME 8bit welcome.
  38.